Representing Semantically Analyzed C++ Code with Reprise
نویسندگان
چکیده
A prominent stumbling block in the spread of the C++ programming language has been a lack of programming and analysis tools to aid development and maintenance of C++ systems. One way to make the job of tool developers easier and to increase the quality of the tools they create is to factor out the common components of tools and provide the components as easily (re)used building blocks. Those building blocks include lexical , syntactic, and semantic analyzers, tailored database derivers, code annotators and instrumentors, and code generators. From these building blocks, tools such as structure browsers, data-ow analyzers, program/speciication veriiers, metrics collectors, compilers , interpreters, and the like can be built more easily and cheaply. We believe that for C++ programming and analysis tools the most primitive building blocks are centered around a common representation of semantically analyzed C++ code. In this paper we describe such a representation, called Reprise (REPResentation Including SEmantics). The conceptual model underlying Reprise is based on the use of expressions to capture all semantic information about both the C++ language and code written in C++. The expressions can be viewed as forming a directed graph, where there is an explicit connection from each use of an entity to the declaration giving the semantics of that entity. We elaborate on this model, illustrate how various features of C++ are represented, discuss some categories of tools that would create and manipulate Reprise representations, and brieey describe our current implementation. This paper is not intended to provide a complete deenition of Reprise. Rather, its purpose is to introduce at a high level the basic approach we are taking in representing C++ code.
منابع مشابه
طرح نقشه نمایی مفاهیم طبّ سنّتی ایران در ساختار ابراصطلاحنامه و شبکه معنایی«(UMLS) نظام زبان واحد پزشکی »
Introduction: This research was aimed to analyze mapping scheme of Traditional Iranian Medicine (TIM) with structure of common language of meta- thesaurus and Semantic network Unified Medical System Language (UMLS). The domain, location and relation of TIM in the UMLS is designed, and recitation of location and proportion of the TIM’s concepts are provided. Methods: This is a triphasic research...
متن کاملGenerating Objects from C Code - Features of the CORET Tool-Set
The CORET tool set serves to restructure legacy C code into semantically equivalent C++ code with semantically coherent objects. To obtain semantical coherence, the object structure is derived from a forwardly developed object-oriented analysis model. This paper focuses on the code transformation aspects and addresses special problems due to the fact that we had to depart from C as source-langu...
متن کاملFormal Representation of Safety Verification Conditions
This paper identifies the software information that must be represented in a formal specification of source code level “safety verification conditions” (SVCs) for an object-oriented software system. The formalization does not necessarily require a notation with object-oriented constructs. In particular, a semantically simpler notation based on typed predicate logic is adequate for representing ...
متن کاملClone Detection Beyond Copy&Paste
We argument three positions: 1) independently developed semantically similar code is unlikely to be representationally similar, 2) existing clone detection approaches are ill-suited for detecting such similarities and 3) dynamic clone detection is a promising approach to detect semantically similar yet representationally different code. Numerous clone detection approaches have been proposed [4]...
متن کاملA Reprise of Two Themes
The purpose of this paper is to respond to D. Elkind’s (1985, Developmental Review, 5, 218-226) reply to D. Lapsley and M. Murphy’s (1985, Developmental Review, 5,201-217) critique of the adolescent egocentrism theory. After a reprise of the issues in contention, we address the problem of theoretical consistency and self-other differentiation in Dr. Elkind’s (1967, Chi/d Development, 38, 102.5-...
متن کامل